function findLongestSubstr(s) {
    var reg = /([a-zA-Z\d])\1*/g;
    var max_length = -1;
    var idx, c, length;
    while (match = reg.exec(s)) {
        if (match[0].length > m) {
            max_length = length = match[0].length;
            idx = match.index;
            c = match[0][0];
        }
    }
    return ['' + c.charCodeAt(0), length, [idx, idx + length - 1]]
}